short trick for square and cube